#!/bin/bash

# OTA Client 演示脚本

echo "=========================================="
echo "          OTA Client 演示"
echo "=========================================="

# 检查是否已构建
if [ ! -f "./bin/ota-client" ]; then
    echo "正在构建 OTA Client..."
    make build
fi

echo ""
echo "配置信息:"
echo "- 服务器: http://localhost:8081"
echo "- 产品ID: 1234" 
echo "- 设备SN: 1234"
echo "- 当前版本: 1.0.0"
echo "- 检查间隔: 30秒"
echo ""

echo "提示: 确保 ota-backend 服务正在运行在 localhost:8081"
echo "使用 Ctrl+C 停止客户端"
echo ""

# 运行客户端
echo "启动 OTA Client..."
./bin/ota-client -f demo-config.yaml 